From: Jonas Dreßler Date: Sat, 24 Oct 2020 20:24:35 +0000 (+0200) Subject: windowManager: Check whether metaWindow is NULL after destroy animation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~731 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=96dc6d19dd30ec6dcac375de6811401012e77369;p=gnome-shell.git windowManager: Check whether metaWindow is NULL after destroy animation When logging out or terminating gnome-shell, mutter will unmanage all open windows, triggering the window-close animation in gnome-shell and very quickly after that emitting "kill-window-effects". That means we'll call _destroyWindowDone() to cleanup our animation data, but at this point the MetaWindow of the window is already gone, so we get an error that get_meta_window() returns NULL. Fix that by checking whether get_meta_window() returned NULL and if it did, don't access the window. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2018 Part-of: --- diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 8ea178153..afe45037a 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1614,7 +1614,7 @@ var WindowManager = class { _destroyWindowDone(shellwm, actor) { if (this._destroying.delete(actor)) { - let parent = actor.get_meta_window().get_transient_for(); + const parent = actor.get_meta_window()?.get_transient_for(); if (parent && actor._parentDestroyId) { parent.disconnect(actor._parentDestroyId); actor._parentDestroyId = 0;